<?php $this->load->view($config['site_template'].'/head');?>
<body class="gray-bg">

    <div class="wrapper wrapper-content animated fadeInUp">
        <div class="row">
            <div class="col-sm-12">

                <div class="ibox">
                    <!--
                    <div class="ibox-title">
                        <h5>所有列表</h5>

                        <div class="ibox-tools">
                            <a href="projects.html" class="btn btn-primary btn-xs">创建新项目</a>
                        </div>

                    </div>
                    -->
                    <div class="ibox-content">
                        <div class="row m-b-sm m-t-sm">
                            <div class="col-md-1">
                                <button type="button" id="loading-example-btn" class="btn btn-white btn-sm"><i class="fa fa-refresh"></i> 刷新</button>
                            </div>
                            <div class="col-md-11">
                                <div class="form-inline">
<!--                                    <input type="text" placeholder="请输入异常问题描述" class="input-sm form-control"> -->
                                    <select class="input-sm form-control" id="productLineSerach" data-style="btn-primary" data-width="40%" title="请选择生产线名称">
                                        <option data-hidden="true" value="" disable>---请选择生产线名称---</option>
                                        <?php foreach ($lineData as $value):?>
                                            <option value="<?=$value['lineId']?>" <?= ($value['lineId'] === $productLine) ? "selected" : ""?>><?=$value['lineName']?></option>
                                        <?php endforeach;?>
                                    </select>
                                    <select class="input-sm form-control" id="classesSearch" data-style="btn-primary" data-width="40%" title="请选择班次">
                                        <option data-hidden="true" value="" disable>---请选择班次---</option>
                                        <?php foreach ($classesData as $value):?>
                                            <option value="<?=$value['val']?>" <?= ($value['val'] === $classes) ? "selected" : ""?>><?=$value['valName']?></option>
                                        <?php endforeach;?>
                                    </select>
<!--                                    <span class="input-group-btn">-->
                                        <button type="button" id="serachBtn" class="btn btn-sm btn-primary"> 搜索</button>
<!--                                    </span>-->
                                </div>
                            </div>
                        </div>
                        <div class="project-list">
                            <table class="table table-hover">
                                <tbody>
                                    <tr>
                                        <td class="project-title">
                                            <a href="javascript:void(0)">序号</a>
                                        </td>
                                        <td class="project-title">
                                            <a href="javascript:void(0)">填写人</a>
                                        </td>
<!--                                        <td class="project-title">-->
<!--                                            <a href="javascript:void(0)">所在部门</a>-->
<!--                                        </td>-->
                                        <td class="project-title">
                                            <a href="javascript:void(0)">填写时间</a>
                                        </td>
                                        <td class="project-title">
                                            <a href="javascript:void(0)">生产线名称</a>
                                        </td>
                                        <td class="project-title">
                                            <a href="javascript:void(0)">班次</a>
                                        </td>

                                        <td class="project-title">
                                            <a href="javascript:void(0)">电机滑轮是否磨损</a>
                                        </td>
                                        <td class="project-title">
                                            <a href="javascript:void(0)">电机滑轮照片</a>
                                        </td>
                                        <td class="project-title">
                                            <a href="javascript:void(0)">主体运行是否平稳、无异响</a>
                                        </td>
<!--                                        <td class="project-title">-->
<!--                                            <a href="javascript:void(0)">主体运行是否异响</a>-->
<!--                                        </td>-->
                                        <td class="project-title">
                                            <a href="javascript:void(0)">搅拌轴轴承是否磨损、破裂</a>
                                        </td>
                                        <td class="project-title">
                                            <a href="javascript:void(0)">搅拌轴轴承照片</a>
                                        </td>
<!--                                        <td class="project-title">-->
<!--                                            <a href="javascript:void(0)">搅拌轴轴承是否破裂</a>-->
<!--                                        </td>-->
                                        <td class="project-title">
                                            <a href="javascript:void(0)">星型阀轴承是否平稳、无异响</a>
                                        </td>
<!--                                        <td class="project-title">-->
<!--                                            <a href="javascript:void(0)">星型阀轴承是否异响</a>-->
<!--                                        </td>-->
                                        <td class="project-title">
                                            <a href="javascript:void(0)">设备编号照片</a>
                                        </td>
                                        <td class="project-title">
                                            <a href="javascript:void(0)">桨叶紧固螺母是否松动</a>
                                        </td>
                                        <td class="project-title">
                                            <a href="javascript:void(0)">桨叶紧固螺母照片</a>
                                        </td>
                                        <td class="project-title">
                                            <a href="javascript:void(0)">高混机桨叶是否磨损</a>
                                        </td>
                                        <td class="project-title">
                                            <a href="javascript:void(0)">高混机桨叶照片</a>
                                        </td>
                                        <td class="project-title">
                                            <a href="javascript:void(0)">冷水管道是否漏水</a>
                                        </td>
<!--                                        <td class="project-title">-->
<!--                                            <a href="javascript:void(0)">冷水管道照片</a>-->
<!--                                        </td>-->
                                        <td class="project-title">
                                            <a href="javascript:void(0)">电机、叶轮运行是否平稳、无异响</a>
                                        </td>
<!--                                        <td class="project-title">-->
<!--                                            <a href="javascript:void(0)">电机、叶轮运行是否异响</a>-->
<!--                                        </td>-->
                                        <td class="project-title">
                                            <a href="javascript:void(0)">主轴轴承、机采运行是否异响、平稳、漏料</a>
                                        </td>
<!--                                        <td class="project-title">-->
<!--                                            <a href="javascript:void(0)">主轴轴承、机采运行是否异响</a>-->
<!--                                        </td>-->
<!--                                        <td class="project-title">-->
<!--                                            <a href="javascript:void(0)">主轴轴承、机采运行是否漏料</a>-->
<!--                                        </td>-->
<!--                                        <td class="project-title">-->
<!--                                            <a href="javascript:void(0)">主轴轴承、机采运行照片</a>-->
<!--                                        </td>-->
                                        <td class="project-title">
                                            <a href="javascript:void(0)">罐体内部有无擦痕</a>
                                        </td>
                                        <td class="project-title">
                                            <a href="javascript:void(0)">罐体内部擦痕照片</a>
                                        </td>
                                        <td class="project-title">
                                            <a href="javascript:void(0)">排料口密封是否漏料</a>
                                        </td>
<!--                                        <td class="project-title">-->
<!--                                            <a href="javascript:void(0)">排料口密封照片</a>-->
<!--                                        </td>-->
                                        <td class="project-title">
                                            <a href="javascript:void(0)">主轴气密封气压(Pa)</a>
                                        </td>
                                        <td class="project-title">
                                            <a href="javascript:void(0)">备注</a>
                                        </td>
<!--                                        <td class="project-title">-->
<!--                                            <a href="javascript:void(0)">主轴气密封气压照片</a>-->
<!--                                        </td>-->
                                        <td class="project-title" style="text-align: right;">
                                            <a href="javascript:void(0)">操作</a>
                                        </td>
                                    </tr>
                                    <?php foreach ($list as $value):?>
                                    <tr>
                                        <td class="project-status">
                                            <span class="label label-primary"><?=$value['lid']?>
                                        </td>
                                        <td class="project">
                                            <?=$value['userName']?>
                                        </td>
<!--                                        <td class="project">-->
<!--                                            --><?//=$value['userDeptName']?>
<!--                                        </td>-->
                                        <td class="project">
                                            <?=date('Y-m-d H:i:s',$value['createTime'])?>
                                        </td>
                                        <td class="project">
                                            <?=$value['productLine']?>
                                        </td>
                                        <td class="project">
                                            <?=$value['classes'] == 0 ? "夜班" : "白班"?>
                                        </td>
                                        <td class="project">
                                            <?=$value['isPulleyAbrasion'] == 0 ? "否" : "是"?>
                                        </td>
                                        <td class="social-avatar">
                                            <a href="javascript:void(0)">
                                                <?php if(strlen($value['pulleyAbrasionImgSrc'])  > 0):?>
                                                    <img alt="image" class="img" id="pulleyAbrasionImgSrc" src="<?=  base_url().$value['pulleyAbrasionImgSrc']?>">
                                                <?php endif;?>
                                            </a>
                                        </td>
                                        <td class="project">
                                            <?=$value['isRunStable'] == 0 ? "否" : "是"?>
                                        </td>
<!--                                        <td class="project">-->
<!--                                            --><?//=$value['isAbnormalSound'] == 0 ? "否" : "是"?>
<!--                                        </td>-->
                                        <td class="project">
                                            <?=$value['isStirBearingAbrasion'] == 0 ? "否" : "是"?>
                                        </td>
                                        <td class="social-avatar">
                                            <a href="javascript:void(0)">
                                                <?php if(strlen($value['stirBearingAbrasionImgSrc'])  > 0):?>
                                                    <img alt="image" class="img" id="stirBearingAbrasionImgSrc" src="<?=  base_url().$value['stirBearingAbrasionImgSrc']?>">
                                                <?php endif;?>
                                            </a>
                                        </td>
<!--                                        <td class="project">-->
<!--                                            --><?//=$value['isStirBearingBroke'] == 0 ? "否" : "是"?>
<!--                                        </td>-->
                                        <td class="project">
                                            <?=$value['isStarBearingStable'] == 0 ? "否" : "是"?>
                                        </td>
<!--                                        <td class="project">-->
<!--                                            --><?//=$value['isStarBearingAbnormalSound'] == 0 ? "否" : "是"?>
<!--                                        </td>-->
                                        <td class="social-avatar">
                                            <a href="javascript:void(0)">
                                                <?php if(strlen($value['equipmentNOImgSrc'])  > 0):?>
                                                    <img alt="image" class="img" id="equipmentNOImgSrc" src="<?=  base_url().$value['equipmentNOImgSrc']?>">
                                                <?php endif;?>
                                            </a>
                                        </td>
                                        <td class="project">
                                            <?=$value['isNutLooseness'] == 0 ? "否" : "是"?>
                                        </td>
                                        <td class="social-avatar">
                                            <a href="javascript:void(0)">
                                                <?php if(strlen($value['nutLoosenessImgSrc'])  > 0):?>
                                                    <img alt="image" class="img" id="nutLoosenessImgSrc" src="<?=  base_url().$value['nutLoosenessImgSrc']?>">
                                                <?php endif;?>
                                            </a>
                                        </td>
                                        <td class="project">
                                            <?=$value['isPaddleBladeAbrasion'] == 0 ? "否" : "是"?>
                                        </td>
                                        <td class="social-avatar">
                                            <a href="javascript:void(0)">
                                                <?php if(strlen($value['paddleBladeAbrasionImgSrc'])  > 0):?>
                                                    <img alt="image" class="img" id="paddleBladeAbrasionImgSrc" src="<?=  base_url().$value['paddleBladeAbrasionImgSrc']?>">
                                                <?php endif;?>
                                            </a>
                                        </td>
                                        <td class="project">
                                            <?=$value['isWaterLeakage'] == 0 ? "否" : "是"?>
                                        </td>
<!--                                        <td class="social-avatar">-->
<!--                                            <a href="javascript:void(0)">-->
<!--                                                --><?php //if(strlen($value['waterLeakageImgSrc'])  > 0):?>
<!--                                                    <img alt="image" class="img" id="waterLeakageImgSrc" src="--><?//=  base_url().$value['waterLeakageImgSrc']?><!--">-->
<!--                                                --><?php //endif;?>
<!--                                            </a>-->
<!--                                        </td>-->
                                        <td class="project">
                                            <?=$value['isImpellerRunStable'] == 0 ? "否" : "是"?>
                                        </td>
<!--                                        <td class="project">-->
<!--                                            --><?//=$value['isImpellerRunAbnormalSound'] == 0 ? "否" : "是"?>
<!--                                        </td>-->
<!--                                        <td class="project">-->
<!--                                            --><?//=$value['isPrincipalAxisStable'] == 0 ? "否" : "是"?>
<!--                                        </td>-->
                                        <td class="project">
                                            <?=$value['isPrincipalAxisAbnormalSound'] == 0 ? "否" : "是"?>
                                        </td>
<!--                                        <td class="project">-->
<!--                                            --><?//=$value['isPrincipalAxisMaterLeakage'] == 0 ? "否" : "是"?>
<!--                                        </td>-->
<!--                                        <td class="social-avatar">-->
<!--                                            <a href="javascript:void(0)">-->
<!--                                                --><?php //if(strlen($value['principalAxisMaterLeakageImgSrc'])  > 0):?>
<!--                                                    <img alt="image" class="img" id="principalAxisMaterLeakageImgSrc" src="--><?//=  base_url().$value['principalAxisMaterLeakageImgSrc']?><!--">-->
<!--                                                --><?php //endif;?>
<!--                                            </a>-->
<!--                                        </td>-->
                                        <td class="project">
                                            <?=$value['isScratch'] == 0 ? "否" : "是"?>
                                        </td>
                                        <td class="social-avatar">
                                            <a href="javascript:void(0)">
                                                <?php if(strlen($value['scratchImgSrc'])  > 0):?>
                                                    <img alt="image" class="img" id="scratchImgSrc" src="<?=  base_url().$value['scratchImgSrc']?>">
                                                <?php endif;?>
                                            </a>
                                        </td>
                                        <td class="project">
                                            <?=$value['isDischargeLeakage'] == 0 ? "否" : "是"?>
                                        </td>
<!--                                        <td class="social-avatar">-->
<!--                                            <a href="javascript:void(0)">-->
<!--                                                --><?php //if(strlen($value['dischargeLeakageImgSrc'])  > 0):?>
<!--                                                    <img alt="image" class="img" id="dischargeLeakageImgSrc" src="--><?//=  base_url().$value['dischargeLeakageImgSrc']?><!--">-->
<!--                                                --><?php //endif;?>
<!--                                            </a>-->
<!--                                        </td>-->
                                        <td class="project">
                                            <?=$value['pressure']?> Pa
                                        </td>
                                        <td class="project">
                                            <?=$value['remark']?>
                                        </td>
<!--                                        <td class="social-avatar">-->
<!--                                            <a href="javascript:void(0)">-->
<!--                                                --><?php //if(strlen($value['pressureImgSrc'])  > 0):?>
<!--                                                <img alt="image" class="img" id="pressureImgSrc" src="--><?//=  base_url().$value['pressureImgSrc']?><!--">-->
<!--                                                --><?php //endif;?>
<!--                                            </a>-->
<!--                                        </td>-->
                                        <td class="project-actions">
                                            <a href="javascript:void(0)" class="btn btn-white btn-sm showOrder"><input type="hidden" name="id" value="<?=$value['id']?>"><i class="fa fa-folder"></i> 查看 </a>
                                            <!--<a href="projects.html#" class="btn btn-white btn-sm"><i class="fa fa-pencil"></i> 编辑 </a>-->
                                        </td>
                                    </tr>
                                    <?php endforeach;?>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    <script>
       $(document).ready(function() {
            $("#loading-example-btn").click(function() {
                btn = $(this);
                simpleLoad(btn, true);
                simpleLoad(btn, false)
                var productLineSerach = $("#productLineSerach option:selected").val();
                var classesSearch = $("#classesSearch option:selected").val();
                window.location.href = "<?=base_url('XunJian_YiPei/dataAllList_SBEJDJB?productLine=')?>" + productLineSerach + "&classes=" + classesSearch;
            })
            $('.img').click(function(){
                var src = $(this).attr("src")
                var id = $(this).attr("id");
                var showText;
                if(id == "pressureImgSrc"){
                    showText = "主轴气密封气压照片";
                }else if(id == "pulleyAbrasionImgSrc"){
                    showText = "电机滑轮照片";
                }else if(id == "stirBearingAbrasionImgSrc"){
                    showText = "搅拌轴轴承照片";
                }else if(id == "nutLoosenessImgSrc"){
                    showText = "桨叶紧固螺母照片";
                }else if(id == "paddleBladeAbrasionImgSrc"){
                    showText = "高混机桨叶照片";
                }else if(id == "waterLeakageImgSrc"){
                    showText = "冷水管道照片";
                }else if(id == "principalAxisMaterLeakageImgSrc"){
                    showText = "主轴轴承、机采运行照片";
                }else if(id == "scratchImgSrc"){
                    showText = "罐体内部擦痕照片";
                }else if(id == "dischargeLeakageImgSrc"){
                    showText = "排料口密封照片";
                }else if(id == "equipmentNOImgSrc"){
                    showText = "设备编号照片";
                }
                $(".showText").text(showText);
                $("#thumb").attr('src',src);
                $(".showThumb").click();
            });
            $("#serachBtn").click(function () {
                var productLineSerach = $("#productLineSerach option:selected").val();
                var classesSearch = $("#classesSearch option:selected").val();
                window.location.href = "<?=base_url('XunJian_YiPei/dataAllList_SBEJDJB?productLine=')?>" + productLineSerach + "&classes=" + classesSearch;
            });
            $(".showOrder").click(function(){
                var id = $(this).find("[name=id]").val();
                $.ajax({
                    type:"GET",
                    url:'<?=base_url("XunJian_YiPei/getSingleContent_SBEJDJB?id=")?>'+id,
                    dataType: "json",
                    success:function(data){
                        if(data.userName.length > 0){
                            $("#userName").html(data.userName);
                        }else{
                            $("#userName").html("无数据");
                        }
                        // if(data.userDeptName.length > 0){
                        //     $("#userDeptName").html(data.userDeptName);
                        // }else{
                        //     $("#userDeptName").html("无数据");
                        // }
                        if(data.createTime.length > 0){
                            $("#createTime").html(data.createTime);
                        }else{
                            $("#createTime").html("无数据");
                        }
                        if(data.productLine.length > 0){
                            $("#productLine").html(data.productLine);
                        }else{
                            $("#productLine").html("无数据");
                        }
                        if(data.classes.length > 0){
                            var classes;
                            if(data.classes == 0){
                                classes = "夜班";
                            }else if(data.classes == 1){
                                classes = "白班";
                            }
                            $("#classes").html(classes);
                        }else{
                            $("#classes").html("无数据");
                        }
                        if(data.equipmentNOImgSrc.length > 0){
                            $("#equipmentNOImgSrcShow").html('<img src="<?=  base_url()?>'+data.equipmentNOImgSrc+'" class="img-responsive" alt="Cinque Terre">');
                        }else{
                            $("#equipmentNOImgSrcShow").html("无数据");
                        }
                        if(data.isPulleyAbrasion.length > 0){
                            var isPulleyAbrasion;
                            if(data.isPulleyAbrasion == 0){
                                isPulleyAbrasion = "否";
                            }else if(data.isPulleyAbrasion == 1){
                                isPulleyAbrasion = "是";
                            }
                            $("#isPulleyAbrasion").html(isPulleyAbrasion);
                        }else{
                            $("#isPulleyAbrasion").html("无数据");
                        }
                        if(data.pulleyAbrasionImgSrc.length > 0){
                            $("#pulleyAbrasionImgSrcShow").html('<img src="<?=  base_url()?>'+data.pulleyAbrasionImgSrc+'" class="img-responsive" alt="Cinque Terre">');
                        }else{
                            $("#pulleyAbrasionImgSrcShow").html("无数据");
                        }
                        if(data.isRunStable.length > 0){
                            var isRunStable;
                            if(data.isRunStable == 0){
                                isRunStable = "否";
                            }else if(data.isRunStable == 1){
                                isRunStable = "是";
                            }
                            $("#isRunStable").html(isRunStable);
                        }else{
                            $("#isRunStable").html("无数据");
                        }
                        // if(data.isAbnormalSound.length > 0){
                        //     var isAbnormalSound;
                        //     if(data.isAbnormalSound == 0){
                        //         isAbnormalSound = "否";
                        //     }else if(data.isAbnormalSound == 1){
                        //         isAbnormalSound = "是";
                        //     }
                        //     $("#isAbnormalSound").html(isAbnormalSound);
                        // }else{
                        //     $("#isAbnormalSound").html("无数据");
                        // }
                        if(data.isStirBearingAbrasion.length > 0){
                            var isStirBearingAbrasion;
                            if(data.isStirBearingAbrasion == 0){
                                isStirBearingAbrasion = "否";
                            }else if(data.isStirBearingAbrasion == 1){
                                isStirBearingAbrasion = "是";
                            }
                            $("#isStirBearingAbrasion").html(isStirBearingAbrasion);
                        }else{
                            $("#isStirBearingAbrasion").html("无数据");
                        }
                        if(data.stirBearingAbrasionImgSrc.length > 0){
                            $("#stirBearingAbrasionImgSrcShow").html('<img src="<?=  base_url()?>'+data.stirBearingAbrasionImgSrc+'" class="img-responsive" alt="Cinque Terre">');
                        }else{
                            $("#stirBearingAbrasionImgSrcShow").html("无数据");
                        }
                        // if(data.isStirBearingBroke.length > 0){
                        //     var isStirBearingBroke;
                        //     if(data.isStirBearingBroke == 0){
                        //         isStirBearingBroke = "否";
                        //     }else if(data.isStirBearingBroke == 1){
                        //         isStirBearingBroke = "是";
                        //     }
                        //     $("#isStirBearingBroke").html(isStirBearingBroke);
                        // }else{
                        //     $("#isStirBearingBroke").html("无数据");
                        // }
                        if(data.isStarBearingStable.length > 0){
                            var isStarBearingStable;
                            if(data.isStarBearingStable == 0){
                                isStarBearingStable = "否";
                            }else if(data.isStarBearingStable == 1){
                                isStarBearingStable = "是";
                            }
                            $("#isStarBearingStable").html(isStarBearingStable);
                        }else{
                            $("#isStarBearingStable").html("无数据");
                        }
                        // if(data.isStarBearingAbnormalSound.length > 0){
                        //     var isStarBearingAbnormalSound;
                        //     if(data.isStarBearingAbnormalSound == 0){
                        //         isStarBearingAbnormalSound = "否";
                        //     }else if(data.isStarBearingAbnormalSound == 1){
                        //         isStarBearingAbnormalSound = "是";
                        //     }
                        //     $("#isStarBearingAbnormalSound").html(isStarBearingAbnormalSound);
                        // }else{
                        //     $("#isStarBearingAbnormalSound").html("无数据");
                        // }
                        if(data.isNutLooseness.length > 0){
                            var isNutLooseness;
                            if(data.isNutLooseness == 0){
                                isNutLooseness = "否";
                            }else if(data.isNutLooseness == 1){
                                isNutLooseness = "是";
                            }
                            $("#isNutLooseness").html(isNutLooseness);
                        }else{
                            $("#isNutLooseness").html("无数据");
                        }
                        if(data.nutLoosenessImgSrc.length > 0){
                            $("#nutLoosenessImgSrcShow").html('<img src="<?=  base_url()?>'+data.nutLoosenessImgSrc+'" class="img-responsive" alt="Cinque Terre">');
                        }else{
                            $("#nutLoosenessImgSrcShow").html("无数据");
                        }
                        if(data.isPaddleBladeAbrasion.length > 0){
                            var isPaddleBladeAbrasion;
                            if(data.isPaddleBladeAbrasion == 0){
                                isPaddleBladeAbrasion = "否";
                            }else if(data.isPaddleBladeAbrasion == 1){
                                isPaddleBladeAbrasion = "是";
                            }
                            $("#isPaddleBladeAbrasion").html(isPaddleBladeAbrasion);
                        }else{
                            $("#isPaddleBladeAbrasion").html("无数据");
                        }
                        if(data.paddleBladeAbrasionImgSrc.length > 0){
                            $("#paddleBladeAbrasionImgSrcShow").html('<img src="<?=  base_url()?>'+data.paddleBladeAbrasionImgSrc+'" class="img-responsive" alt="Cinque Terre">');
                        }else{
                            $("#paddleBladeAbrasionImgSrcShow").html("无数据");
                        }
                        if(data.isWaterLeakage.length > 0){
                            var isWaterLeakage;
                            if(data.isWaterLeakage == 0){
                                isWaterLeakage = "否";
                            }else if(data.isWaterLeakage == 1){
                                isWaterLeakage = "是";
                            }
                            $("#isWaterLeakage").html(isWaterLeakage);
                        }else{
                            $("#isWaterLeakage").html("无数据");
                        }
                        //if(data.waterLeakageImgSrc.length > 0){
                        //    $("#waterLeakageImgSrcShow").html('<img src="<?//=  base_url()?>//'+data.waterLeakageImgSrc+'" class="img-responsive" alt="Cinque Terre">');
                        //}else{
                        //    $("#waterLeakageImgSrcShow").html("无数据");
                        //}
                        if(data.isImpellerRunStable.length > 0){
                            var isImpellerRunStable;
                            if(data.isImpellerRunStable == 0){
                                isImpellerRunStable = "否";
                            }else if(data.isImpellerRunStable == 1){
                                isImpellerRunStable = "是";
                            }
                            $("#isImpellerRunStable").html(isImpellerRunStable);
                        }else{
                            $("#isImpellerRunStable").html("无数据");
                        }
                        // if(data.isImpellerRunAbnormalSound.length > 0){
                        //     var isImpellerRunAbnormalSound;
                        //     if(data.isImpellerRunAbnormalSound == 0){
                        //         isImpellerRunAbnormalSound = "否";
                        //     }else if(data.isImpellerRunAbnormalSound == 1){
                        //         isImpellerRunAbnormalSound = "是";
                        //     }
                        //     $("#isImpellerRunAbnormalSound").html(isImpellerRunAbnormalSound);
                        // }else{
                        //     $("#isImpellerRunAbnormalSound").html("无数据");
                        // }
                        // if(data.isPrincipalAxisStable.length > 0){
                        //     var isPrincipalAxisStable;
                        //     if(data.isPrincipalAxisStable == 0){
                        //         isPrincipalAxisStable = "否";
                        //     }else if(data.isPrincipalAxisStable == 1){
                        //         isPrincipalAxisStable = "是";
                        //     }
                        //     $("#isPrincipalAxisStable").html(isPrincipalAxisStable);
                        // }else{
                        //     $("#isPrincipalAxisStable").html("无数据");
                        // }
                        if(data.isPrincipalAxisAbnormalSound.length > 0){
                            var isPrincipalAxisAbnormalSound;
                            if(data.isPrincipalAxisAbnormalSound == 0){
                                isPrincipalAxisAbnormalSound = "否";
                            }else if(data.isPrincipalAxisAbnormalSound == 1){
                                isPrincipalAxisAbnormalSound = "是";
                            }
                            $("#isPrincipalAxisAbnormalSound").html(isPrincipalAxisAbnormalSound);
                        }else{
                            $("#isPrincipalAxisAbnormalSound").html("无数据");
                        }
                        // if(data.isPrincipalAxisMaterLeakage.length > 0){
                        //     var isPrincipalAxisMaterLeakage;
                        //     if(data.isPrincipalAxisMaterLeakage == 0){
                        //         isPrincipalAxisMaterLeakage = "否";
                        //     }else if(data.isPrincipalAxisMaterLeakage == 1){
                        //         isPrincipalAxisMaterLeakage = "是";
                        //     }
                        //     $("#isPrincipalAxisMaterLeakage").html(isPrincipalAxisMaterLeakage);
                        // }else{
                        //     $("#isPrincipalAxisMaterLeakage").html("无数据");
                        // }
                        //if(data.principalAxisMaterLeakageImgSrc.length > 0){
                        //    $("#principalAxisMaterLeakageImgSrcShow").html('<img src="<?//=  base_url()?>//'+data.principalAxisMaterLeakageImgSrc+'" class="img-responsive" alt="Cinque Terre">');
                        //}else{
                        //    $("#principalAxisMaterLeakageImgSrcShow").html("无数据");
                        //}
                        if(data.isScratch.length > 0){
                            var isScratch;
                            if(data.isScratch == 0){
                                isScratch = "否";
                            }else if(data.isScratch == 1){
                                isScratch = "是";
                            }
                            $("#isScratch").html(isScratch);
                        }else{
                            $("#isScratch").html("无数据");
                        }
                        if(data.scratchImgSrc.length > 0){
                            $("#scratchImgSrcShow").html('<img src="<?=  base_url()?>'+data.scratchImgSrc+'" class="img-responsive" alt="Cinque Terre">');
                        }else{
                            $("#scratchImgSrcShow").html("无数据");
                        }
                        if(data.isDischargeLeakage.length > 0){
                            var isDischargeLeakage;
                            if(data.isDischargeLeakage == 0){
                                isDischargeLeakage = "否";
                            }else if(data.isDischargeLeakage == 1){
                                isDischargeLeakage = "是";
                            }
                            $("#isDischargeLeakage").html(isDischargeLeakage);
                        }else{
                            $("#isDischargeLeakage").html("无数据");
                        }
                        //if(data.dischargeLeakageImgSrc.length > 0){
                        //    $("#dischargeLeakageImgSrcShow").html('<img src="<?//=  base_url()?>//'+data.dischargeLeakageImgSrc+'" class="img-responsive" alt="Cinque Terre">');
                        //}else{
                        //    $("#dischargeLeakageImgSrcShow").html("无数据");
                        //}
                        if(data.pressure.length > 0){
                            $("#pressure").html(data.pressure + " Pa");
                        }else{
                            $("#pressure").html("无数据");
                        }
                        if(data.remark.length > 0){
                            $("#remark").html(data.remark);
                        }else{
                            $("#remark").html("无数据");
                        }
                        //if(data.pressureImgSrc.length > 0){
                        //    $("#pressureImgSrcShow").html('<img src="<?//=  base_url()?>//'+data.pressureImgSrc+'" class="img-responsive" alt="Cinque Terre">');
                        //}else{
                        //    $("#pressureImgSrcShow").html("无数据");
                        //}
                        $(".showAbnormalQas").click();
                    }
                    
                })
            })
        });

        function simpleLoad(btn, state) {
            if (state) {
                btn.children().addClass("fa-spin");
                btn.contents().last().replaceWith(" Loading")
            } else {
                setTimeout(function() {
                    btn.children().removeClass("fa-spin");
                    btn.contents().last().replaceWith(" Refresh")
                },
                2000)
            }
        };
    
        $(function () { $('#imgShow').modal('hide')});
        $(function () { $('#imgShow').on('hide.bs.modal', function () {
           //alert('嘿，我听说您喜欢模态框...');
           })
        });
    </script>
    
    </body>
    <!--异常问题截图展示-->
    <!-- 按钮触发模态框 -->
    <button class="btn btn-primary btn-lg showThumb" style="display: none" data-toggle="modal" data-target="#imgShow">
            演示图片模态框
    </button>
    <!-- 模态框（Modal） -->
    <div class="modal fade" id="imgShow" tabindex="-1" role="dialog" aria-labelledby="imgShowLabel" aria-hidden="true">
            <div class="modal-dialog">
                    <div class="modal-content">
                            <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×
                                    </button>
                                    <h4 class="modal-title" id="imgShowLabel">
                                        <div class="showText">异常问题截图</div>
                                    </h4>
                            </div>
                            <div class="modal-body">
                                    <img id="thumb" src="" class="img-responsive" alt="Cinque Terre"> 
                            </div>
                            <div class="modal-footer">
                                    <button type="button" class="btn btn-primary" data-dismiss="modal">
                                            关闭
                                    </button>
                            </div>
                    </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->
    
    <!--异常问题详细内容展示-->
    <!-- 按钮触发模态框 -->
    <button class="btn btn-primary btn-lg showAbnormalQas" style="display: none" data-toggle="modal" data-target="#AbnormalQasShow">
            异常问题详细模态框
    </button>
    <!-- 模态框（Modal） -->
    <div class="modal fade" id="AbnormalQasShow" tabindex="-1" role="dialog" aria-labelledby="AbnormalQasShowLabel" aria-hidden="true">
            <div class="modal-dialog">
                    <div class="modal-content">
                            <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×
                                    </button>
                                    <h4 class="modal-title" id="AbnormalQasShowLabel">
                                        设备二级点检表
                                    </h4>
                            </div>
                            <div class="modal-body">
                                <div class="form-group">
                                    <label class="col-sm-6 control-label well well-sm">填写人</label>
                                    <div id="userName" class="col-sm-6 well well-sm">
                                    </div>
                                </div>
<!--                                <div class="form-group">-->
<!--                                    <label class="col-sm-6 control-label well well-sm">所在部门</label>-->
<!--                                    <div id="userDeptName" class="col-sm-6 well well-sm">-->
<!--                                    </div>-->
<!--                                </div>-->
                                <div class="form-group">
                                    <label class="col-sm-6 control-label well well-sm">填写时间</label>
                                    <div id="createTime" class="col-sm-6 well well-sm">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-6 control-label well well-sm">生产线名称</label>
                                    <div id="productLine" class="col-sm-6 well well-sm">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-6 control-label well well-sm">班次</label>
                                    <div id="classes" class="col-sm-6 well well-sm">
                                    </div>
                                </div>



                                <div class="form-group">
                                    <label class="col-sm-6 control-label well well-sm">电机滑轮是否磨损</label>
                                    <div id="isPulleyAbrasion" class="col-sm-6 well well-sm">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-6 control-label well well-sm">电机滑轮照片</label>
                                    <div id="pulleyAbrasionImgSrcShow" class="col-sm-6 well well-sm">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-6 control-label well well-sm">主体运行是否平稳、无异响</label>
                                    <div id="isRunStable" class="col-sm-6 well well-sm">
                                    </div>
                                </div>
<!--                                <div class="form-group">-->
<!--                                    <label class="col-sm-6 control-label well well-sm">主体运行是否异响</label>-->
<!--                                    <div id="isAbnormalSound" class="col-sm-6 well well-sm">-->
<!--                                    </div>-->
<!--                                </div>-->
                                <div class="form-group">
                                    <label class="col-sm-6 control-label well well-sm">搅拌轴轴承是否磨损、破裂</label>
                                    <div id="isStirBearingAbrasion" class="col-sm-6 well well-sm">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-6 control-label well well-sm">搅拌轴轴承照片</label>
                                    <div id="stirBearingAbrasionImgSrcShow" class="col-sm-6 well well-sm">
                                    </div>
                                </div>

<!--                                <div class="form-group">-->
<!--                                    <label class="col-sm-6 control-label well well-sm">搅拌轴轴承是否破裂</label>-->
<!--                                    <div id="isStirBearingBroke" class="col-sm-6 well well-sm">-->
<!--                                    </div>-->
<!--                                </div>-->
                                <div class="form-group">
                                    <label class="col-sm-6 control-label well well-sm">星型阀轴承是否平稳、无异响</label>
                                    <div id="isStarBearingStable" class="col-sm-6 well well-sm">
                                    </div>
                                </div>
<!--                                <div class="form-group">-->
<!--                                    <label class="col-sm-6 control-label well well-sm">星型阀轴承是否异响</label>-->
<!--                                    <div id="isStarBearingAbnormalSound" class="col-sm-6 well well-sm">-->
<!--                                    </div>-->
<!--                                </div>-->
                                <div class="form-group">
                                    <label class="col-sm-6 control-label well well-sm">设备编号照片</label>
                                    <div id="equipmentNOImgSrcShow" class="col-sm-6 well well-sm">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-6 control-label well well-sm">桨叶紧固螺母是否松动</label>
                                    <div id="isNutLooseness" class="col-sm-6 well well-sm">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-6 control-label well well-sm">桨叶紧固螺母照片</label>
                                    <div id="nutLoosenessImgSrcShow" class="col-sm-6 well well-sm">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-6 control-label well well-sm">高混机桨叶是否磨损</label>
                                    <div id="isPaddleBladeAbrasion" class="col-sm-6 well well-sm">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-6 control-label well well-sm">高混机桨叶照片</label>
                                    <div id="paddleBladeAbrasionImgSrcShow" class="col-sm-6 well well-sm">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-6 control-label well well-sm">冷水管道是否漏水</label>
                                    <div id="isWaterLeakage" class="col-sm-6 well well-sm">
                                    </div>
                                </div>
<!--                                <div class="form-group">-->
<!--                                    <label class="col-sm-6 control-label well well-sm">冷水管道照片</label>-->
<!--                                    <div id="waterLeakageImgSrcShow" class="col-sm-6 well well-sm">-->
<!--                                    </div>-->
<!--                                </div>-->
                                <div class="form-group">
                                    <label class="col-sm-6 control-label well well-sm">电机、叶轮运行是否平稳、无异响</label>
                                    <div id="isImpellerRunStable" class="col-sm-6 well well-sm">
                                    </div>
                                </div>
<!--                                <div class="form-group">-->
<!--                                    <label class="col-sm-6 control-label well well-sm">电机、叶轮运行是否异响</label>-->
<!--                                    <div id="isImpellerRunAbnormalSound" class="col-sm-6 well well-sm">-->
<!--                                    </div>-->
<!--                                </div>-->
<!--                                <div class="form-group">-->
<!--                                    <label class="col-sm-6 control-label well well-sm">主轴轴承、机采运行是否平稳</label>-->
<!--                                    <div id="isPrincipalAxisStable" class="col-sm-6 well well-sm">-->
<!--                                    </div>-->
<!--                                </div>-->
                                <div class="form-group">
                                    <label class="col-sm-6 control-label well well-sm">主轴轴承、机采运行是否异响、平稳、漏料</label>
                                    <div id="isPrincipalAxisAbnormalSound" class="col-sm-6 well well-sm">
                                    </div>
                                </div>
<!--                                <div class="form-group">-->
<!--                                    <label class="col-sm-6 control-label well well-sm">主轴轴承、机采运行是否漏料</label>-->
<!--                                    <div id="isPrincipalAxisMaterLeakage" class="col-sm-6 well well-sm">-->
<!--                                    </div>-->
<!--                                </div>-->
<!--                                <div class="form-group">-->
<!--                                    <label class="col-sm-6 control-label well well-sm">主轴轴承、机采运行照片</label>-->
<!--                                    <div id="principalAxisMaterLeakageImgSrcShow" class="col-sm-6 well well-sm">-->
<!--                                    </div>-->
<!--                                </div>-->
                                <div class="form-group">
                                    <label class="col-sm-6 control-label well well-sm">罐体内部有无擦痕</label>
                                    <div id="isScratch" class="col-sm-6 well well-sm">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-6 control-label well well-sm">罐体内部擦痕照片</label>
                                    <div id="scratchImgSrcShow" class="col-sm-6 well well-sm">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-6 control-label well well-sm">排料口密封是否漏料</label>
                                    <div id="isDischargeLeakage" class="col-sm-6 well well-sm">
                                    </div>
                                </div>
<!--                                <div class="form-group">-->
<!--                                    <label class="col-sm-6 control-label well well-sm">排料口密封照片</label>-->
<!--                                    <div id="dischargeLeakageImgSrcShow" class="col-sm-6 well well-sm">-->
<!--                                    </div>-->
<!--                                </div>-->
                                <div class="form-group">
                                    <label class="col-sm-6 control-label well well-sm">主轴气密封气压(Pa)</label>
                                    <div id="pressure" class="col-sm-6 well well-sm">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-6 control-label well well-sm">备注</label>
                                    <div id="remark" class="col-sm-6 well well-sm">
                                    </div>
                                </div>
<!--                                <div class="form-group">-->
<!--                                    <label class="col-sm-6 control-label well well-sm">主轴气密封气压照片</label>-->
<!--                                    <div id="pressureImgSrcShow" class="col-sm-6 well well-sm">11</div>-->
<!--                                </div>-->
                            </div>
                            <div class="modal-footer">
                                    <button type="button" class="btn btn-primary" data-dismiss="modal">
                                            关闭
                                    </button>
                            </div>
                    </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->
<?php $this->load->view($config['site_template'].'/foot');?>